<%@ page import="java.util.Map" %>
<%@ page import="util.*" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Sistema CDs</title>
    <link rel="stylesheet" href="style.css">
  </head>
  <h1>Sistema CDs</h1>
  <h2>Agregar CD</h2>
  <% List bandas = (List)request.getAttribute("bandas"); %>
  
  <form name="AgregarCD" action="/agregarCD" method="get">
    <table>
      <thead>
        <tr>
          <th></th><th></th>
        </tr>
      </thead>
      <tbody>
        <tr>          
          <td>Nombre:</td><td><input type="text" name="nombre" value=""/></td>
        </tr>
        <tr>
          <td>A&ntilde;o de publicaci&oacute;n:</td><td><input type="text" name="anoPublicacion" value=""/></td>
        </tr>
        <tr>
          <td>Precio</td>
          <td>
            <input type="text" name="precio" value=""/>
          </td>
        </tr>
        <tr>
          <td>Banda</td>
          <td>
            <select name="fk_banda">
              <% for(int i = 0, n = bandas.size(); i < n; i++) {
                      BandaDTO banda= (BandaDTO) bandas.get(i); %>
                      <option value="<%= banda.getPk_banda() %>" >
                        <%= banda.getNombre() %>
                      </option>
              <% } %>
            </select>
          </td>
        <tr>
        </tr>      
      </tbody>
      <tfoot>
        <tr>
          <td><input type="submit" value="Agregar" /></td><td></td>
        </tr>
      </tfoot>
    </table>
  </form>
</html>
